﻿using TaoSH.AppCode;
using TaoSH.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TaoSH.View
{
    public partial class YHJB : FormUControl
    {




        #region//添加页面

        public override void initAddForm(string strFormCode)
        {

        }




        /// <summary>
        /// 送审表单
        /// </summary>
        /// <param name="FormID">表单号</param>
        /// <param name="intProcessInstanceID">流程号</param>
        /// <returns></returns>
        public override bool SaveForm(int intFormID, string strActionType)
        {
            PT_User_Level MODEL = new PT_User_LevelB().GetEntity(d => d.ID == intFormID);
            MODEL.LvlName = conJBName.Text;
            MODEL.LvlDesp = conJBMS.Text;
            MODEL.IsRato = conISFR.SelectedValue;
            MODEL.Rato1 = decimal.Parse(conFRBL.Text);
            MODEL.Rato2 =  decimal.Parse(conFRBL1.Text);
            MODEL.ToUp = 2;




            return new PT_User_LevelB().Update(MODEL);
        }
        #endregion

        #region//查看页面
        /// <summary>
        /// 初始化View页面
        /// </summary>
        /// <param name="intFormID">表单号</param>
        public override void initMangerForm(int intFormID)
        {
            PT_User_Level MODEL = new PT_User_LevelB().GetEntity(d => d.ID == intFormID);
            conJBName.Text = MODEL.LvlName;
            conJBMS.Text = MODEL.LvlDesp;
            conISFR.SelectedValue = MODEL.IsRato;
            conFRBL.Text = MODEL.Rato1.ToString();
            conFRBL1.Text = MODEL.Rato2.ToString();
        }

        #endregion





    }
}